<template>
  <view class="margin-sm">
      <view class="cu-bar bg-white margin-top-xs">
        <view class="sub-title">
          <text class="text-black">梵好兑礼</text>
          <text class="text-ABC text-blue"></text>
        </view>
        <view  @click="goVideo"><text class="more">更多>&nbsp;</text></view>
      </view>
      <view class="skill-sequence-panel-content-wrapper">
        <!--左边虚化-->
<!--        <view class="hide-content-box hide-content-box-left"></view>-->
        <!--右边虚化-->
<!--        <view class="hide-content-box hide-content-box-right"></view>-->
        <scroll-view scroll-x="true" class="kite-classify-scroll">
          <view class="kite-classify-cell shadow" v-for="(item, index) in curriculum" :key="index" @click="goVideo">
<!--            <view class="nav-li bg-index">-->
<!--              <view class="nav-name">{{ item.name }}</view>-->
<!--            </view>-->
            <img src="../../static/images/yhq.png" class="img-yhq" />
            <view class="nav-content">{{ item.content }}</view>
            <!-- <view @click="goVideo" class="nav-btn shadow" :class="'bg-index' + (index + 1)">立即学习</view> -->
          </view>
        </scroll-view>
      </view>
  </view>
</template>

<script setup lang="ts">

import {onMounted, computed, reactive, ref} from 'vue'
import {onLoad, onReady, onShow,onLaunch} from '@dcloudio/uni-app';

import IndexTools from "./IndexTools.vue";
import IndexMsg from "./IndexMsg.vue";
import IndexOrderStastic from "./indexOrderStastic.vue";
import {redirectLoginPage} from '@/common/utils/redirectPage'

import {useStore} from "@/common/store";
import IndexSearch from "./indexSearch.vue";
import IndexSwipper from "./indexSwipper.vue";
const store = useStore();

const token = computed(() => store.token)
const userId = computed(() => store.userId)

const curriculum = ref( [{
      name: '100元红包',
      content: '2200 - 3000积分兑换'
    },
      {
        name: '100元加油卡',
        content: '2000积分兑换'
      },
      {
        name: '100元话费',
        content: '2000积分兑换'
      },
      {
        name: '500元人民币',
        content: '5000积分兑换'
      },
      {
        name: '1000元人民币',
        content: '10000积分兑换'
      }
    ])

const goVideo = () => {
  uni.showToast({
    icon: 'none',
    duration: 3000,
    title: `功能正在开发中，敬请期待`
  });
}


</script>

<style lang="scss" scoped>

.text-black{ font-size: 36rpx; color: #232323;}
.more{font-size: 28rpx; color: #838383;}
.indexes {
  height: 100vh;
  padding-top: 50px;
  position: relative;
}

/*scroll-view外层*/
.skill-sequence-panel-content-wrapper {
  position: relative;
  white-space: nowrap;
  //padding: 10rpx 0 10rpx 10rpx;
}


/*左右渐变遮罩*/
.hide-content-box {
  position: absolute;
  top: 0;
  height: 100%;
  width: 10px;
  z-index: 2;
}

.hide-content-box-left {
  left: 0;
  background-image: linear-gradient(to left, rgba(255, 255, 255, 0), #f3f3f3 60%);
}

.hide-content-box-right {
  right: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0), #f3f3f3 60%);
}

.kite-classify-scroll {
  width: 100%;
  height: 320rpx;
  overflow: hidden;
  white-space: nowrap;
}

.kite-classify-cell {
  display: inline-block;
  width: 222rpx;
  height: 370rpx;
  margin-right: 20rpx;
  background-color: #ffffff;
  border-radius: 10rpx;
  overflow: hidden;
  //box-shadow: 2px 2px 3px rgba(26, 26, 26, 0.2);
}


.nav-li {
  padding: 40rpx 30rpx;
  width: 100%;
  background-image: url(https://s1.ax1x.com/2020/06/27/NyU04x.png);
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 1;
}

.nav-name {
  font-size: 28upx;
  text-transform: Capitalize;
  margin-top: 20upx;
  position: relative;
}

.nav-name::before {
  content: '';
  position: absolute;
  display: block;
  width: 40rpx;
  height: 6rpx;
  background: #fff;
  bottom: 0;
  right: 0;
  opacity: 0.5;
}

.nav-name::after {
  content: '';
  position: absolute;
  display: block;
  width: 100rpx;
  height: 1px;
  background: #fff;
  bottom: 0;
  right: 40rpx;
  opacity: 0.3;
}

.nav-content {
  width: 100%;
  padding: 15rpx;
  display: inline-block;
  overflow-wrap: break-word;
  white-space: normal;
  font-size:26rpx;
  color: #1B1B1B;
}

.nav-btn {
  width: 200rpx;
  height: 60rpx;
  margin: 8rpx auto;
  text-align: center;
  line-height: 60rpx;
  border-radius: 10rpx;
}

.bg-index {
  color: white;
  background-color:#DAA520;
}
.img-yhq{
  width: 220rpx;
  height: 220rpx;
  display: block;
}
</style>
